<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<div id="app">
  <comm-home></comm-home>
</div>
</body>
<script src="https://cdn.bootcdn.net/ajax/libs/vue/2.6.12/vue.js"></script>
<script>
const CommonTitle={
  template:`
    <div>
      <h1>title组件</h1>
      <br/>
      {{title}}
      {{subtitle}}
    </div>
  `,
  props: ['title', 'subtitle']
}
const Home={
  template:`
    <div> 
      home组件
      <common-title title="你好！！" subtitle="你好是价额！！"></common-title>
    </div>`,
  data(){
    return{
      
    }
  },
  components:{
    CommonTitle
  }
}
Vue.component('CommHome', Home);
const vm = new Vue ( {
  el: '#app'
} )
</script>
</html>